/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package trirparser;

import com.hp.hpl.jena.rdf.model.Model;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.SAXException;
import trirparser.ontologija.VremeOntologija;

/**
 *
 * @author Igor
 */
public class TRIRParser implements Runnable{

    /**
     * @param args the command line arguments
     */
    
    public static void main(String[] args) throws ParserConfigurationException, SAXException {
  
        try {
            (new Thread(new TRIRParser())).run();            
        } catch (Exception ex) {
            Logger.getLogger(TRIRParser.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    @Override
    public void run() {
       try {
           while(true){
                Weather w = new Weather();
                ShraniRDF rdf = new ShraniRDF();
                ArrayList<VremeOntologija> modeliTemp;

                modeliTemp = rdf.shraniPodatkeOMestihVRDF(w.vrniPodatkeOMestih());
                ShraniFTP ftpTest = new ShraniFTP();
                ftpTest.Shrani(modeliTemp);
                Thread.sleep(21600000);
           }
        } catch (Exception ex) {
            Logger.getLogger(TRIRParser.class.getName()).log(Level.SEVERE, null, ex);
        }        
    }
}
